home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Data 1996 December / CD-ROM DATA 96.ISO / SOFTDEV / VB4TIPS.TXT < prev    next >
Encoding:
Text File  |  1996-11-05  |  5.6 KB  |  98 lines

  1. ***Visual Basic4.0 supports conditional compilation. This allows you to easily include or exclude 
  2. code. This ability is useful when you have one code source which must be compiled to create both 
  3. Windows 16- and 32-bit applications. It is also useful when creating debug and retail versions 
  4. of your application. 
  5.  
  6.  
  7. ***Visual Basic4.0 supports system defined colors. Select ColorConstants in the Classes/Modules 
  8. list box of the Object Browser. Colors in use will appear in the Methods/Properties box. By 
  9. using these colors you can ensure that your application interface will be displayed according 
  10. to user system color settings. 
  11.  
  12. ***You can nudge controls one pixel at a time in Visual Basicá4.0. Use the Ctrl+Arrow key 
  13. combination to change the position, and the Shift+Arrow key combination to change the size. 
  14. The Align to Grid option must be disabled in order for these commands to work. 
  15.  
  16. ***At design time you can size rows and columns in the DBGrid. Just right click on the DBGrid 
  17. and select Edit from the shortcut menu. 
  18.  
  19. ***You can describe the methods and properties of your OLE Automation Servers in the Object 
  20. for reference purposes. To add descriptions, select ObjectBrowser on the View menu. Click the 
  21. correct options of the Classes/Modules and Methods/Properties lists in the ObjectBrowser 
  22. window, and press the Options... button. 
  23.  
  24. ***Visual Basicá4.0 supports custom cursors. To display a custom icon, in the Properties window 
  25. set the MousePointer property to 99-Custom. Then, also in the Properties window, set MouseIcon 
  26. to the icon of your choice. If either of these properties is not accurately set, the default 
  27. mouse pointer will be used. 
  28.  
  29. ***You should remove all unused Custom Controls and References from a project prior to using 
  30. the SetupWizard. If unused Custom Controls and References are not removed, the SetupWizard 
  31. will include these files. To remove Custom Controls from your project Toolbox, choose Custom 
  32. Controls from the Tools menu, and click to clear the check box next to each unwanted control. 
  33. To remove unused References, choose References from the Project menu and click to clear the 
  34. check boxes of any unwanted References. 
  35.  
  36.  
  37. ***It is possible to have errors in your code that do not show up when using the default 
  38. "Compile on Demand" option in Visual Basicá4.0. As long as the code is never executed the 
  39. error will not surface. You can easily force all code to be checked for errors by clicking 
  40. Start with Full Compile from the Run menu. 
  41.  
  42. ***You can speed up Visual Basicá4.0 programs by eliminating as many dots as possible between 
  43. objects and methods or properties. Each dot corresponds to one or more function calls. You can 
  44. eliminate dots by setting intermediate object variables, and using the With statement and the 
  45. For Each loop. You should also look out for default properties. The dot may not be visible when 
  46. you use a default property, but the underlying function call remains. 
  47.  
  48.  
  49. ***Have a large project? Get it up and running instantly with Background Project Load. This 
  50. feature allows Visual Basicá4.0 to quickly load projects, forms and modules, so you can get 
  51. to your code fast. Just choose Options on the Tools menu and click the Advanced tab. Under 
  52. Project Load, click Background Project Load. 
  53.  
  54. ***Visual Basicá4.0 provides new functions that allow you to easily save and retrieve 
  55. application settings. The application setting functions are GetSetting, GetAllSettings, 
  56. SaveSetting, and DeleteSetting. 
  57.  
  58. ***You can step through your code as you write it without setting a breakpoint. Just click 
  59. Step to Cursor on the Run menu. The application will suspend execution and enter break mode 
  60. when it reaches the point where your cursor was last positioned. 
  61.  
  62.  
  63. ***You can pass a control array in Visual Basicá4.0. Just declare your parameter "As Object," 
  64. and when calling the procedure pass the name of the control array without any parentheses. 
  65.  
  66. ***Typelibs give you instant access to the methods and properties of an object, including 
  67. constants. And with Typelibs there's no additional baggage in your EXEáù you only compile in 
  68. what you use. For more information on Typelibs and Visual Basic, see Article Q143258, 
  69. "How to Create Constants and DLL Declarations in a Type Library." 
  70.  
  71.  
  72. ***You can specify the indentation of items within your TreeView control by using the TreeView.
  73. Indentation property. 
  74.  
  75. ***A handy new feature in VB4 allows you to go back to your Last Position in the code editor. 
  76. This is very useful when used in conjunction with the view Procedure Definition option. For 
  77. example, if you are reading some code and see a call to a certain function, you can press 
  78. Shift+F2 to immediately jump to the code for that function. To get back to the point where the 
  79. function was called, simply press Ctrl+Shift+F2. 
  80.  
  81. ***The Visual Basic 4.0 project window supports drag-and-drop operations. For example, you can 
  82. drag files from the Windows 95 explorer onto the project window to add them to the project. 
  83.  
  84. ***You can use Visual Basic to write Add-ins that extend the functionality of the Visual Basic 
  85. 4.0 design environment. 
  86.  
  87.  
  88. ***You can perform Remote Automation over the Internet (the Internet is simply another network 
  89. running TCP/IP). 
  90.  
  91. ***For Remote Automation, various levels of Network Security are available through the Remote 
  92. Automation Connection Manager utility. 
  93.  
  94. ***Controls added to a Visual Basic 4.0 form will inherit the Font properties of the form. 
  95.  
  96. ***Pass a null pointer for API parameters declared "Byval As String" by passing the 
  97. vbNullString constant. 
  98.